package haiyangwangwork.day02.homework;

public class Polygon {
    int sides;
    double area;

    public void getNumberOfSides(){
        System.out.println("三角形的边数为："+this.sides);
    }

    public Polygon(int sides){
        this.sides=sides;
        System.out.println("在Polygon类的构造器中");
    }

    @Override
    public String toString() {
        return super.toString();
    }

    public void getNumbersOfSides() {
        System.out.println("三角形的边数为："+this.sides);
    }
}
